export type AppObj = {
  [prop: string]: string | number | boolean
}


export type Mode = 'cors' | 'no-cors' | 'same-origin'
export type Credentials = 'same-origin' | 'include' | 'same-origin'
export type Referrer = 'no-referrer' | 'client'
export type ContentType = 'text/html' | 'text/plain' | 'image/png' | 'image/jpeg' | 'image/gif ' | 'application/json ' | 'application/x-www-form-urlencoded' | 'multipart/form-data'

export type Params = {
  params?: BodyInit | string | AppObj,
  url: string
  method?: string
  headers?: any
}

export type AppResponse = {
  code: number,
  data: any,
  message:string
}

export enum HttpMsg {
  NetErr = '网络故障，请稍后重试',
  Loading = '正在拼命加载中',
  ReLogin = '登录已过期，系统将会在3秒后自动退出，请重新登录',
  DeleConfirm = '删除数据后，将无法回复，确认删除么',
  LogoutConfirm = '退出登录后将会XXXX，确定要退出么',
}